//
google.load("jquery", "1.5");google.load("jqueryui", "1.8");
$(function(){
$.getScript("http://hana.poche.jp/wazameba/js/cmtprofpix.js");
$('#waza').prependTo('#comment_module');


$("#hukugan").hover(function () {
        $(this).animate({
                left: '0px'
        }, 800);
}, function () {
        $(this).animate({
                left: '-170px'
        }, 1000);
});
});

//.google-analytics
var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-23580171-1']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s)})();


//Web Analyst
if ('https:' == document.location.protocol){
var _wa_prt = 'https';var _wa_dom = 'w10154.wa-track.com';
}else{ var _wa_prt = 'http';var _wa_dom = 'w10154.lb.wa-track.com'; }
var _wa_que = [];_wa_que.push({cmd:'init',id:'WA-143-351-210',prt:_wa_prt,dom:_wa_dom});
var _wa_scr = document.createElement('script');_wa_scr.type = 'text/javascript';
_wa_scr.async = true;_wa_scr.charset = 'UTF-8';_wa_scr.src = _wa_prt + '://' + _wa_dom + '/wa.js';
var _wa_hd = document.getElementsByTagName('script')[0];
_wa_hd.parentNode.insertBefore(_wa_scr,_wa_hd);

//http://plugins.jquery.com/node/467/release?api_version[]=59
(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end)}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];return colors[jQuery.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))break;attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);

//http://ameblo.jp/zzdino/entry-10706846151.html
$(function(){
$('#recent_comment ul li').append('<div class="comauth"></div>');
$('.comauth').each(function(){
var myS=$(this).prev().attr('href');
var myU=myS.length-12;
var myT=myS.substr(myU,12);
$(this).load(myS+' a[id='+myT+']+.each_comment .comment_footer .comment_author a');
});
});

//
var table ='<Table id="table"><Tr><Td class="fmenu"><div id="td1"></div></Td><td class="fmenu"><div id="td4"></div></td></Tr></Table>'
$(function () {
    $("#footerArea").before('<div>' + table + '</div>');
    $("#recent_entries,#theme_list").appendTo("#td1");
    $("#profile,#ranking").appendTo("#td4");
});


//themeCloud
//http://ameblo.jp/adorechic/entry-10469603561.html
rex = RegExp("([^\(]+)[^0-9]+([0-9]+)");
var list = document.getElementById("theme_list").getElementsByTagName("li");
var hrefList = new Array(list.length);
var themeList = new Array(list.length);
var sizeList = new Array(list.length);
var totalSize = 0;
for(var i = 0, len = list.length; i < len; i++){
  var aTag = list[i].getElementsByTagName("a")[0];
  hrefList[i] = aTag.href;

  var val = aTag.innerHTML;
  val.match(rex);
  themeList[i] = RegExp.$1;
  var size = parseInt(RegExp.$2);
  sizeList[i] = size;
  totalSize += size;
}
var themeCloud = "";
for(var i = 0, len = list.length; i < len; i++){
  var size = Math.ceil(15 * sizeList[i] / totalSize);
  if(size > 4) size = 4;
  themeCloud += '<a href="' + hrefList[i] + '" style="font-size: ' + size + 'em;">' + themeList[i] +'</a>'
}
document.getElementById("theme_list").innerHTML =  themeCloud;

//edit
$(function(){$('#sub_main .entry .foot a:first-child').each(function(){var myAA=$(this).attr('href');$(this).after('<a style="margin-right:10px;margin-left:10px;" href="http://blog.ameba.jp/ucs/entry/srventryupdateinput.do?id='+myAA.substr(myAA.length-16,11)+'" target="_blank">編集</a>')})});



//smoothscroll
//http://www.coolwebwindow.com/weblife_column/coolweb/000301.php
$(function(){$('a[href^=#]').click(function(){var speed=1000;var href=$(this).attr("href");var target=$(href=="#"||href==""?'html':href);var position=target.offset().top;$($.browser.safari?'body':'html').animate({scrollTop:position},speed,'swing');return false})});







//画像のポップアップスクリプト
//http://ameblo.jp/zzdino/entry-10901061440.html
$(function(){$('#mainIndex').append('<div id="photoz" />');var photo=$('#photoz');$('#sub_main a.detailOn').click(function(){var imgsrc=$('img',this).attr('src');var src1=imgsrc.replace(/[a-z][0-9_]{28}\.(jpg|png|gif)/,'o'+imgsrc.split('/')[10].split('_')[1]);photo.after('<div class="gazoz"><img src="'+src1+'"/></div>');var phoimg=photo.next().children('img');phoimg.load(function(){var photoh=phoimg.outerHeight();var winh=$(window).height();photo.slideDown(900,function(){if(photoh>winh-60){phoimg.css({height:winh-photoh+phoimg.height()-60,marginTop:30})}else{phoimg.css('marginTop',(winh-photoh)/2)}phoimg.show().wrap('<div title="クリックで閉じます" class="imgwrap" />')})});return false});$('#photoz+.gazoz .imgwrap').live('click',function(){$(this).parent().prev().hide().end().remove()})});






//titlelink
$(function(){$("#sub_main .entry h3.title").wrapInner("<a></a>");$('#sub_main .foot>a:first-child').each(function(i){$("#sub_main .entry h3.title a").eq(i).attr("href",this.href)})});





$(function () {
    $("#sub_main div.page").eq(0).clone().appendTo("#page1");
});



//
/*
　最近の記事一覧をタグクラウド風に
　Copyright(c) wazameba 2011 All Rights Reserved.
　2011/03/09 わざめーば
　2011/03/10 わざめーば コメントがあればボールドに
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 5(){$.l({m:\'n://o.q/\'+r.s.6(/^.+\\:\\/\\/[^\\/]+\\/([^\\/]+).*$/,"$1")+\'/t.u\',v:3(b){4 c=w x();$(\'#y 7\',b).8(3(i,e){4 a=$(\'p+p>a\',e);2($(a).z){2($(a).9().A(/^.*コメント\\((\\d+)\\).*$/)){c.f($(a).9().6(/^.*コメント\\((\\d+)\\).*$/,\'$1\'))}}B{c.f(\'0\')}});$(\'#C 7\').8(3(i,e){4 a=g;2(c[i]>=1){a=D}2(c[i]>=g){a=E}2(c[i]>=h){a=F}2(c[i]>=G){a=H}2(c[i]>=I){a=h}$(e).j(\'k-J\',\'\'+a+\'K\');2(c[i]>=1){$(e).j(\'k-L\',\'M\')}})}})}5();',49,49,'||if|function|var|wzmbRecentEntriesTagCloudy|replace|li|each|text||||||push|14|20||css|font|ajax|url|http|ameblo||jp|location|href|entrylist|html|success|new|Array|recent_entries_list|length|match|else|recent_entries|20|30|40|50|18|100|size|px|weight|bold'.split('|'),0,{}));



//articlefloater
var memberid = 233;
var deletetitleleft = 0;
var deletetitleright = 13;
var tablewidth = 621;
var textcolor = '000000';
var backgroundcolortitle = 'ffffff';
var backgroundcoloreven = 'ffffff';
var backgroundcolorodd = 'ffffff';
var bordercolorouter = 'ffffff';
var bordercolorinnertitle = 'ffffff';
var bordercolorinnerlist = 'ffffff';
var titlelang = 'jp';
var linecount = 10;
//********************
//
//
var url = location.href;
if (url.match(/^.+\/entry[\-0-9]*\.html$/g)) {
        $(function () {
                $('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin'); //admin
                $("#ArticleFloaterDiv").insertAfter('#exLinkBtn');
        });

//zen
document.write(unescape("%3Cscript")+" src='http://widget.zenback.jp/?base_uri=http%3A//ameblo.jp/fukushima-heart&nsid=93387548386187507%3A%3A96356993748461464&rand="+Math.ceil((new Date()*1)*Math.random())+"' type='text/javascript'"+unescape("%3E%3C/script%3E"));
jQuery(function($) {
jQuery("#zenback_loady").insertAfter("#exLinkBtn");
});
        //articlefloater
        var articletitle = encodeURI(document.title);
        var viewedurl = encodeURI(decodeURI(document.URL));
        var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
        document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));
}
else if (url.match(/^.+\/entry[\-0-9]*\.html\#main$/g)) {
        $(function () {
                $('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin'); //admin
                $("#ArticleFloaterDiv").insertAfter('#exLinkBtn');
        });

//zen
document.write(unescape("%3Cscript")+" src='http://widget.zenback.jp/?base_uri=http%3A//ameblo.jp/fukushima-heart&nsid=93387548386187507%3A%3A96356993748461464&rand="+Math.ceil((new Date()*1)*Math.random())+"' type='text/javascript'"+unescape("%3E%3C/script%3E"));
jQuery(function($) {
jQuery("#zenback_loady").insertAfter("#exLinkBtn");
});
        //articlefloater
        var articletitle = encodeURI(document.title);
        var viewedurl = encodeURI(decodeURI(document.URL));
        var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
        document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));
}
else if (url.match(/^.+\/entry[\-0-9]*\.html\#cbox$/g)) {
        $(function () {
                $('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin'); //admin
                $("#ArticleFloaterDiv").insertAfter('#exLinkBtn');
        });

//zen
document.write(unescape("%3Cscript")+" src='http://widget.zenback.jp/?base_uri=http%3A//ameblo.jp/fukushima-heart&nsid=93387548386187507%3A%3A96356993748461464&rand="+Math.ceil((new Date()*1)*Math.random())+"' type='text/javascript'"+unescape("%3E%3C/script%3E"));
jQuery(function($) {
jQuery("#zenback_loady").insertAfter("#exLinkBtn");
});
        //articlefloater
        var articletitle = encodeURI(document.title);
        var viewedurl = encodeURI(decodeURI(document.URL));
        var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
        document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));
}
else if (url.match(/^.+\/entry[\-0-9]*\.html\#c[\0-9]*$/g)) {
        $(function () {
                $('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin'); //admin
                $("#ArticleFloaterDiv").insertAfter('#exLinkBtn');
        });
        
//zen
document.write(unescape("%3Cscript")+" src='http://widget.zenback.jp/?base_uri=http%3A//ameblo.jp/fukushima-heart&nsid=93387548386187507%3A%3A96356993748461464&rand="+Math.ceil((new Date()*1)*Math.random())+"' type='text/javascript'"+unescape("%3E%3C/script%3E"));
jQuery(function($) {
jQuery("#zenback_loady").insertAfter("#exLinkBtn");
});
        //articlefloater
        var articletitle = encodeURI(document.title);
        var viewedurl = encodeURI(decodeURI(document.URL));
        var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
        document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));
}
//テーマ別記事の次のページ以降全て
else if (url.match(/^.+\/theme[0-9]*[\-0-9]*\.html\#main$/g )) {
//実行させる内容    
}
//テーマ別記事の次のページ以降全て
else if (url.match(/^.+\/theme[0-9]*[\-0-9]*\.html$/g )) {
//実行させる内容
}
//テーマ別記事の最初のページ
else if (url.match(/^.+\/theme[\-0-9]*\.html$/g )) {
//実行させる内容
}
//TOPページ
else if (url == "http://ameblo.jp/fukushima-heart") {
//実行させる内容
$('#sub_main .theme a').attr('title','同じテーマの記事だけ読みますか？');
}
//TOPページ2
else if (url == "http://ameblo.jp/fukushima-heart/") {
//実行させる内容
$('#sub_main .theme a').attr('title','同じテーマの記事だけ読みますか？');
}
//TOPページ2ページ以降全て
else if (url.match(/^.+\/page[\-0-9]*\.html\#main$/g )) {
//実行させる内容
$('#sub_main .theme a').attr('title','同じテーマの記事だけ読みますか？');
}
//TOPページ2ページ以降全て
else if (url.match(/^.+\/page[\-0-9]*\.html$/g )) {
//実行させる内容
$('#sub_main .theme a').attr('title','同じテーマの記事だけ読みますか？');
}